/**
 * All Rights Reserved , Copyright (C) 2020 , 青岛鼎信通讯股份有限公司
 * <p>
 * IBaseChangeLogService
 * 变更记录表
 * <p>
 * 修改纪录
 * 2020-12-01 版本：1.0 zhanglongfei 创建。
 *
 * @version 版本：1.0
 * @author 作者：zhanglongfei
 * 创建日期：2020-12-01
 */

package com.topscomm.base.service;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

import org.springframework.boot.configurationprocessor.json.JSONArray;
import org.springframework.boot.configurationprocessor.json.JSONException;

import com.topscomm.base.IBaseService;
import com.topscomm.base.dao.IBaseChangeLogDao;
import com.topscomm.base.pojo.BaseChangeLogEntity;
import com.topscomm.basic.BasicEntity;

public interface IBaseChangeLogService extends IBaseService<BaseChangeLogEntity, IBaseChangeLogDao> {
	/**
	 * 添加客户变更记录
	 *
	 * @param inputMap
	 * @return
	 */
	String insertChangeLog(Map<String, Object> inputMap);

	/**
	 * @Description: 根据入参查询不同客户表的历史记录, 更具创建时间倒叙排序
	 * @Author: mengmeng
	 * @Param: paraMap{ sourceType: sourceId: topSourceType: topSourceId }
	 * @Return: List<BaseChangeLogEntity>
	 * @Date: 2020/12/8 19:31
	 */
	List<Map<String, Object>> queryChangeLogByOptions(Map<String, Object> paraMap) throws Exception;

	JSONArray compareData(Map<String, Object> oldMap, Map<String, Object> newMap,
			List<Map<String, Object>> baseProperties, String baselogoperatetype) throws JSONException, ParseException;

	boolean isSaveChangeLog(Map<String, Object> map, String tableName, String newVersion);
	void insertLogMap(Map<String, Object> logMap);
	String compareDataForMpm(Map<String, Object> oldMap, Map<String, Object> newMap,
							 List<Map<String, Object>> baseProperties, String baselogoperatetype)throws JSONException, ParseException;
}
